﻿@{
    Layout = null;
   
}

<form id="form_resetPWD" onkeydown="if(event.keyCode==13){return false;}">
    <div class="form-group">
        <label for="Pwd">新密码：</label>
        <input type="password" class="form-control" id="Pwd" name="Pwd" placeholder="新密码">

    </div>
    <div class="form-group">
        <label for="newPwd">确定密码：</label>
        <input type="password" class="form-control" id="newPwd" placeholder="确认密码" name="confirmPassword">

    </div>
</form>
<script>
    //input验证
    $('#form_resetPWD').bootstrapValidator({
        message: '类型名称不能为空',
        excluded: [':disabled'],
        fields: {
            Pwd: {
                message:'密码无效',
                validators: {
                    notEmpty: {
                        message: '密码不能为空'
                    },
                    stringLength: {
                        min: 6,
                        max: 30,
                        message: '密码长度必须在6到30之间'
                    },
                    regexp: {
                        regexp: /^[a-zA-Z0-9_\.]+$/,
                        message: '密码只能由字母、数字、点和下划线组成'
                    }
                }
            },
            confirmPassword: {
                message: '密码无效',
                validators: {
                    notEmpty: {
                        message: '密码不能为空'
                    },
                    stringLength: {
                        min: 6,
                        max: 30,
                        message: '密码长度必须在6到30之间'
                    },
                    identical: {
                        field: 'Pwd',
                        message: '两次密码不一致'
                    },
                    regexp: {//匹配规则
                        regexp: /^[a-zA-Z0-9_\.]+$/,
                        message: '密码只能由字母、数字、点和下划线组成'
                    }
                }
            }
        },
    })
</script>



